package dujiu.luogu.circulation;

import java.util.Scanner;

public class P1307 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        // 要反转的整数
        int N = scanner.nextInt();
        scanner.close();
        String strN = N + "";
        String[] split = strN.split("");
        int length = split.length -1;
        StringBuilder newStr = new StringBuilder();
        int j = 0;
        if (N == 0){
            System.out.println(0);
        }
        if (N < 0){
            newStr.append("-");
            j += 1;
        }
        for (int i = length  ; i >= j; i--) {
            if ("0".equals(split[length])){
                length -= 1;
                continue;
            }
            newStr.append(split[i]);
        }
        System.out.println(newStr);
    }
}
